package com.sharding.spherexa.mapper;

import com.sharding.spherexa.entity.ItemStock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
public interface ItemStockMapper {
    int insert(ItemStock itemStock);

    List<ItemStock> selectAll();

    int reduceStock(@Param("itemId") long itemId, @Param("num") int num);
}
